package com.common.retrofit.methods;

import com.common.retrofit.base.BaseMethods;
import com.common.retrofit.entity.bean.MingXiBean;
import com.common.retrofit.service.HaiNingService;

import rx.Observable;
import rx.Subscriber;

public class GetMingXiMethods extends BaseMethods {

    private static GetMingXiMethods m_ins = null;

    public static GetMingXiMethods getInstance() {
        if (m_ins == null) {
            synchronized (GetMingXiMethods.class) {
                if (m_ins == null) {
                    m_ins = new GetMingXiMethods();
                }
            }
        }
        return m_ins;
    }

    @Override
    protected String getHttpUrl() {
        return "MyCase/";
    }

    private HaiNingService initService() {
        return getRetrofit().create(HaiNingService.class);
    }


    public void Transaction(Subscriber<MingXiBean> subscriber,
                     int uid,String hashid ,String search,int page ) {
        Observable observable = initService().Transaction(System.currentTimeMillis()+"",
                "87c73aa933382155f2feeb3cb4b233d3",uid,hashid,search ,page
        );
        toSubscribe(observable, subscriber);
    }
}
